import 'package:fish_redux/fish_redux.dart';

import 'action.dart';
import 'state.dart';

Effect<TruancysubmissionState> buildEffect() {
  return combineEffects(<Object, Effect<TruancysubmissionState>>{
    TruancysubmissionAction.action: _onAction,
    TruancysubmissionAction.onupdateData: _onupdateData,

  });
}

void _onAction(Action action, Context<TruancysubmissionState> ctx) {
}
void _onupdateData(Action action, Context<TruancysubmissionState> ctx) {

}
//上传旷课信息
//Future<void> _request(Context<TruancysubmissionState> ctx, String task_content) async {
//  Map<String, String> params = Map();
//  params["task_content"] = task_content;
//
//  params["class_id"] = await SpUtil.getStringItem(Constants.classID);
//  DioApi.instance.asyncRequestNetwork<BaseEntity>(
//      Method.post,
//      HttpApi.PUSHTASK,
//      params: params, onStart: () {
//    println('请求开始');
//    EasyLoading.show(status: 'loading...');
//  }, onSuccess: (dynamic t) async {
//    showToast("上传成功");
//  }, onError: (String msg) {
//    println('请求报错 msg:$msg');
//    showToast(msg);
//  }, onDone: () {
//    EasyLoading.dismiss();
//  }, isList: false);
//}

//获取学生列表
//Future<void> _request(Context<TruancysubmissionState> ctx, String task_content) async {
//  Map<String, String> params = Map();
//  params["task_content"] = task_content;
//
//  params["class_id"] = await SpUtil.getStringItem(Constants.classID);
//  DioApi.instance.asyncRequestNetwork<BaseEntity>(
//      Method.post,
//      HttpApi.PUSHTASK,
//      params: params, onStart: () {
//    println('请求开始');
//    EasyLoading.show(status: 'loading...');
//  }, onSuccess: (dynamic t) async {
//    showToast("上传成功");
//  }, onError: (String msg) {
//    println('请求报错 msg:$msg');
//    showToast(msg);
//  }, onDone: () {
//    EasyLoading.dismiss();
//  }, isList: false);
//}